package org.shean.app.rssreader;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TabHost;
import android.widget.TextView;


public class SzRSSChannelTabActivity extends TabActivity implements TabHost.TabContentFactory {

	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        requestWindowFeature(Window.FEATURE_NO_TITLE);

        final TabHost tabHost = getTabHost();
        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("Channels")
                .setContent(new Intent(this, ChannelListActivity.class)));
        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("Tags")
                .setContent(new Intent(this, TagListActivity.class)));
        
        tabHost.setCurrentTab(0);
    }

    /** {@inheritDoc} */
    public View createTabContent(String tag) {
        final TextView tv = new TextView(this);
        tv.setText("Content for tab with tag " + tag);
        return tv;
    }
}
